home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / educate / tcndos34.zip / TCNSTALL.BAT < prev    next >
DOS Batch File  |  1996-08-29  |  11KB  |  381 lines

  1. @echo off
  2. cls
  3. if "%1" == ""  goto explain
  4. if "%1" == "?" goto explain
  5. :install
  6. if "%1" == "C" goto installa
  7. if "%1" == "D" goto installa
  8. if "%1" == "E" goto installa
  9. if "%1" == "F" goto installa
  10. goto drivechk
  11. :installa
  12. @echo off
  13. if not "%2" == ""  goto installb
  14. if exist %1:\usa\options.lxx goto warning1
  15. if exist %1:\usa\*.* goto fail3
  16. goto chk1a 
  17. :installb
  18. if exist %1:\%2\options.lxx goto warning1
  19. if exist %1:\%2\*.* goto fail3
  20. :chk1a
  21. if "%2" == "" TCND34AB %1:\usa
  22. if not "%2" == "" TCND34AB %1:\%2
  23. :CHKBB1
  24. IF EXIST TCND34BB.EXE GOTO BB1
  25. CLS
  26. ECHO INSERT DISK 2 OF 2 WITH TCND34BB.EXE ON IT.
  27. ECHO.
  28. PAUSE
  29. GOTO CHKBB1
  30. :BB1
  31. if "%2" == "" TCND34BB %1:\usa
  32. if not "%2" == "" TCND34BB %1:\%2
  33. goto pass1
  34. :warning1
  35. cls
  36. echo WARNING!!!
  37. echo.
  38. echo A copy of the TCN program already exists.  If you continue, it will be
  39. echo overwritten and any previous work you have done will be lost.
  40. echo.
  41. echo To avoid overwriting, use the CTRL + C key combination and then type a Y
  42. echo according to the following instructions:
  43. echo.
  44. echo     1)  Press and hold the CTRL key.
  45. echo     2)  Type the letter C.
  46. echo     3)  Release both keys.  A prompt appears "Terminate batch job (Y/N)?"
  47. echo     4)  Type the letter Y.
  48. echo.
  49. echo The DOS prompt appears.  Type TCNSTALL ? to get information about changing
  50. echo install target drive and directory.
  51. echo.
  52. echo If you want to overwrite, press any other key.
  53. echo.
  54. pause
  55. cls
  56. echo Press and hold the "Y" key to overwrite all files.  When you hear
  57. echo rapid beeping sounds coming from your computer, release the "Y" key.
  58. echo When file extraction stops, hold the "Y" key down some more.
  59. echo.
  60. echo Continue this process until you get a DOS prompt.
  61. echo.
  62. goto chk1a
  63. :fail1
  64. cls
  65. echo Installation was not successful.
  66. echo.
  67. echo You typed the following command:
  68. echo.
  69. echo     TCNSTALL %1 %2
  70. echo.
  71. echo Verify the letter you specified (%1) is a valid drive.  Also, verify
  72. echo that you did NOT type a colon after the letter.
  73. echo.
  74. if not "%2" == "" echo Verify the path you specified (%2) is valid.
  75. echo.
  76. echo Type TCNSTALL with: 
  77. echo.
  78. echo      a different drive letter, or 
  79. if not "%2" == "" echo      a different path, or
  80. echo      the ? option.
  81. ECHO.
  82. goto end
  83. :fail3
  84. cls
  85. echo Installation was not attempted.
  86. echo.
  87. echo The install path that you specified is already in use.
  88. echo.
  89. echo You typed the following command:
  90. echo.
  91. echo     TCNSTALL %1 %2 
  92. echo.
  93. echo Type TCNSTALL with: 
  94. echo.
  95. echo      a different drive letter, or 
  96. if not "%2" == "" echo      a different path (option 2), or
  97. if "%2" == "" echo      a path specified (other than USA) using option 2, or
  98. echo      the ? option.
  99. echo.
  100. goto end
  101. :explain
  102. cls
  103. echo This TCNSTALL.BAT file installs version 3.4 of the TCN program on your hard
  104. echo drive.
  105. echo.
  106. echo Example valid commands are presented below with a brief explaination.
  107. echo.
  108. echo TCNSTALL    (with no options) gives you this abbreviated information screen.
  109. echo.
  110. echo TCNSTALL ?  gives you more information about installation.
  111. echo.
  112. echo TCNSTALL C  installs the TCN program in USA (default) directory on C: drive.
  113. echo             Colon ok, not required.  Trailing backslash not allowed.
  114. echo.
  115. echo TCNSTALL C MYDIR  installs the TCN program in MYDIR (second option) directory
  116. echo                   on the C: drive.  No leading or trailing backslashes.
  117. echo.
  118. IF "%1" == "" goto end
  119. PAUSE
  120. CLS
  121. :explain1
  122. echo HARDWARE REQUIREMENTS 
  123. echo.
  124. echo RAM:         640K is required with 512K free at DOS prompt.
  125. echo.
  126. echo Hard Drive:  Required, 1.0 meg mininimum, 1.5 recommended
  127. echo.
  128. echo Monitor:     VGA color recommended but not required
  129. echo.
  130. echo Mouse:       Recommended but not required.
  131. echo.
  132. echo Printer:     any generic ASCII text printer is fine
  133. echo.
  134. pause
  135. cls
  136. echo CRASHES
  137. echo.
  138. echo If the TCN program crashes during startup, insufficient memory is the
  139. echo most likely cause.
  140. echo.
  141. echo Refer to CRASHES DURING STARTUP . . . in the README.DOC file for more
  142. echo information.
  143. echo.
  144. pause
  145. goto end
  146. :drivechk
  147. echo on
  148. if "%1" == "c" goto installa
  149. if "%1" == "C:" goto ginstall
  150. if "%1" == "c:" goto ginstall
  151. if "%1" == "d" goto installa
  152. if "%1" == "D:" goto ginstall
  153. if "%1" == "d:" goto ginstall
  154. if "%1" == "e" goto installa
  155. if "%1" == "E:" goto ginstall
  156. if "%1" == "e:" goto ginstall
  157. if "%1" == "f" goto installa
  158. if "%1" == "F:" goto ginstall
  159. if "%1" == "f:" goto ginstall
  160. if "%1" == "G:" goto ginstall
  161. if "%1" == "G" goto installa
  162. if "%1" == "g" goto installa
  163. if "%1" == "g:" goto ginstall
  164. if "%1" == "H:" goto ginstall
  165. if "%1" == "H" goto installa
  166. if "%1" == "h" goto installa
  167. if "%1" == "h:" goto ginstall
  168. if "%1" == "I:" goto ginstall
  169. if "%1" == "I" goto installa
  170. if "%1" == "i" goto installa
  171. if "%1" == "i:" goto ginstall
  172. if "%1" == "J:" goto ginstall
  173. if "%1" == "J" goto installa
  174. if "%1" == "j" goto installa
  175. if "%1" == "j:" goto ginstall
  176. if "%1" == "K:" goto ginstall
  177. if "%1" == "K" goto installa
  178. if "%1" == "k" goto installa
  179. if "%1" == "k:" goto ginstall
  180. if "%1" == "L:" goto ginstall
  181. if "%1" == "L" goto installa
  182. if "%1" == "l" goto installa
  183. if "%1" == "l:" goto ginstall
  184. if "%1" == "M:" goto ginstall
  185. if "%1" == "M" goto installa
  186. if "%1" == "m" goto installa
  187. if "%1" == "m:" goto ginstall
  188. if "%1" == "N:" goto ginstall
  189. if "%1" == "N" goto installa
  190. if "%1" == "n" goto installa
  191. if "%1" == "n:" goto ginstall
  192. if "%1" == "O:" goto ginstall
  193. if "%1" == "O" goto installa
  194. if "%1" == "o" goto installa
  195. if "%1" == "o:" goto ginstall
  196. if "%1" == "P:" goto ginstall
  197. if "%1" == "P" goto installa
  198. if "%1" == "p" goto installa
  199. if "%1" == "p:" goto ginstall
  200. if "%1" == "Q:" goto ginstall
  201. if "%1" == "Q" goto installa
  202. if "%1" == "q" goto installa
  203. if "%1" == "q:" goto ginstall
  204. if "%1" == "R:" goto ginstall
  205. if "%1" == "R" goto installa
  206. if "%1" == "r" goto installa
  207. if "%1" == "r:" goto ginstall
  208. if "%1" == "S:" goto ginstall
  209. if "%1" == "S" goto installa
  210. if "%1" == "s" goto installa
  211. if "%1" == "s:" goto ginstall
  212. if "%1" == "T:" goto ginstall
  213. if "%1" == "T" goto installa
  214. if "%1" == "t" goto installa
  215. if "%1" == "t:" goto ginstall
  216. if "%1" == "U:" goto ginstall
  217. if "%1" == "U" goto installa
  218. if "%1" == "u" goto installa
  219. if "%1" == "u:" goto ginstall
  220. if "%1" == "v:" goto ginstall
  221. if "%1" == "v" goto installa
  222. if "%1" == "V" goto installa
  223. if "%1" == "V:" goto ginstall
  224. if "%1" == "W:" goto ginstall
  225. if "%1" == "W" goto installa
  226. if "%1" == "w" goto installa
  227. if "%1" == "w:" goto ginstall
  228. if "%1" == "x:" goto ginstall
  229. if "%1" == "x" goto installa
  230. if "%1" == "X" goto installa
  231. if "%1" == "X:" goto ginstall
  232. if "%1" == "Y:" goto ginstall
  233. if "%1" == "Y" goto installa
  234. if "%1" == "y" goto installa
  235. if "%1" == "y:" goto ginstall
  236. if "%1" == "z:" goto ginstall
  237. if "%1" == "z" goto installa
  238. if "%1" == "Z" goto installa
  239. if "%1" == "Z:" goto ginstall
  240. if "%1" == "a:" goto jinstall
  241. if "%1" == "a" goto hinstall
  242. if "%1" == "A" goto hinstall
  243. if "%1" == "A:" goto jinstall
  244. if "%1" == "b:" goto jinstall
  245. if "%1" == "b" goto hinstall
  246. if "%1" == "B" goto hinstall
  247. if "%1" == "B:" goto jinstall
  248. @echo off
  249. CLS
  250. ECHO Drive specifier %1 not recognized.
  251. echo.
  252. echo You typed the following command:
  253. echo.
  254. echo     TCNSTALL %1 %2
  255. ECHO.
  256. ECHO Try again with a different drive specifier.  Or type TCNSTALL ? for
  257. echo more information.
  258. echo.
  259. goto end
  260. :warning2
  261. cls
  262. echo WARNING!!!
  263. echo.
  264. echo A copy of the TCN program already exists.  If you continue, it will be
  265. echo overwritten and any previous work you have done will be lost.
  266. echo.
  267. echo To avoid overwriting, use the CTRL + C key combination and then type a Y
  268. echo according to the following instructions:
  269. echo.
  270. echo     1)  Press and hold the CTRL key.
  271. echo     2)  Type the letter C.
  272. echo     3)  Release both keys.  A prompt appears "Terminate batch job (Y/N)?"
  273. echo     4)  Type the letter Y.
  274. echo.
  275. echo The DOS prompt appears.  Type TCNSTALL ? to get information about changing
  276. echo install target drive and directory.
  277. echo.
  278. echo If you want to overwrite, press any other key.
  279. echo.
  280. pause
  281. cls
  282. echo Press and hold the "Y" key to overwrite all files.  When you hear
  283. echo rapid beeping sounds coming from your computer, release the "Y" key.
  284. echo When file extraction stops, hold the "Y" key down some more.
  285. echo.
  286. echo Continue this process until you get a DOS prompt.
  287. echo.
  288. goto chk1m
  289. :hinstall
  290. if exist %1:\TCnstall.bat goto failsame
  291. goto installa
  292. :jinstall
  293. if exist %1\TCnstall.bat goto failsame
  294. :ginstall
  295. @echo off
  296. if not "%2" == ""  goto installm
  297. if exist %1\usa\options.lxx goto warning2
  298. if exist %1\usa\*.* goto fail3
  299. goto chk1m 
  300. :installm
  301. if exist %1\%2\options.lxx goto warning2
  302. if exist %1\%2\*.* goto fail3
  303. :chk1m
  304. if "%2" == "" TCND34AB %1\usa
  305. if not "%2" == "" TCND34AB %1\%2
  306. :CHKBB2
  307. IF EXIST TCND34BB.EXE GOTO BB2
  308. CLS
  309. ECHO INSERT DISK 2 OF 2 WITH TCND34BB.EXE ON IT.
  310. ECHO.
  311. PAUSE
  312. GOTO CHKBB2
  313. :BB2
  314.  
  315. if "%2" == "" TCND34BB %1\usa  
  316. if not "%2" == "" TCND34BB %1\%2
  317. goto passa
  318. :failsame
  319. @echo off
  320. cls
  321. echo Installation not attempted.
  322. echo.
  323. echo The command you typed:
  324. echo.
  325. echo      TCNSTALL %1 %2
  326. echo.
  327. echo would result in the TCN program being installed on the same drive (%1)
  328. echo as the source disk.  This most often results in an "Insufficient Disk
  329. echo Space" error.
  330. echo.
  331. echo Try typing the TCNSTALL command with a different drive specifier.  Or
  332. echo Type TCNSTALL ? or just TCNSTALL for more information.
  333. echo.
  334. goto end
  335. :passa
  336. if "%2" == "" if not exist %1\usa\tucsna.wtp goto fail1
  337. if NOT "%2" == "" if not exist %1\%2\tucsna.wtp goto fail1
  338. cls
  339. echo Installation was SUCCESSFUL.
  340. echo.
  341. echo To start the TCN program:
  342. echo.
  343. echo     1)  Type %1 
  344. echo     2)  Press ENTER.
  345. if "%2" == ""  goto step3a
  346. echo     3)  Type CD \%2
  347. if exist %1\%2\wtp.tcn del %1\%2\wtp.tcn
  348. rename %1\%2\tucsna.wtp wtp.tcn
  349. goto step4
  350. :step3a
  351. echo     3)  Type CD \USA
  352. if exist %1\usa\wtp.tcn del %1\usa\wtp.tcn 
  353. rename %1\usa\tucsna.wtp wtp.tcn
  354. goto step4
  355. :pass1
  356. if "%2" == "" if not exist %1:\usa\tucsna.wtp goto fail1
  357. if NOT "%2" == "" if not exist %1:\%2\tucsna.wtp goto fail1
  358. cls
  359. echo Installation was SUCCESSFUL.
  360. echo.
  361. echo To start the TCN program:
  362. echo.
  363. echo     1)  Type %1: 
  364. echo     2)  Press ENTER.
  365. if "%2" == "" goto step3a1
  366. echo     3)  Type CD \%2
  367. if exist %1:\%2\wtp.tcn del %1:\%2\wtp.tcn
  368. rename %1:\%2\tucsna.wtp wtp.tcn
  369. goto step4
  370. :step3a1
  371. echo     3)  Type CD \USA
  372. if exist %1:\usa\wtp.tcn del %1:\usa\wtp.tcn
  373. rename %1:\usa\tucsna.wtp wtp.tcn
  374. :step4
  375. echo     4)  Press ENTER.
  376. echo     5)  Type TCN
  377. echo     6)  Press ENTER
  378. echo.
  379. echo.
  380. :end
  381.